package com.liuyuncen.repository;

import com.liuyuncen.entity.Person;
import org.springframework.data.neo4j.annotation.Query;
import org.springframework.data.neo4j.repository.Neo4jRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @belongsProject: SpringBoot-Neo4j
 * @belongsPackage: com.liuyuncen.repository
 * @author: Xiang想
 * @createTime: 2022-09-28  15:03
 * @description: TODO
 * @version: 1.0
 */
@Repository
public interface PersonRepository extends Neo4jRepository<Person, Long> {

    @Query("MATCH (n:Person) WHERE id(n) = $0 RETURN n")
    List<Person> findChildList(Long id);
}
